<#include "macro_.ftl">
package ${packageCode}.${moduleMapperKey}.service;

import java.util.List;
import java.util.Map;

import com.cardone.common.cache.support.CacheEvictSupport;
import com.cardone.common.dto.PaginationDto;
<#list entityMapperList as entityMapper>
<#if entityMapper.markService>
import ${packageCode}.${moduleMapperKey}.dto.${entityMapper.code}Dto;
</#if>
</#list>

/**
 * ${businessMapper.name!businessCode}服务
 *
 * @author ${author!'yaoht'}
 */
public interface ${businessCode}Service extends CacheEvictSupport {
	/**
	 * spring bean id
	 */
	String BEAN_ID = "${packageCode}.${moduleMapperKey}.service.${businessCode}Service";
<#if businessCode == (moduleMapperKey?cap_first)>
<#list moduleMapper.businessMap?values as localBusiness>
<#if (localBusiness.code!) != (moduleMapperKey?cap_first)>

	/**
	 * 获取：${localBusiness.name!localBusiness.code}服务
	 * 
	 * @return ${localBusiness.name!localBusiness.code}服务
	 */
	${localBusiness.code!}Service get${localBusiness.code!}Service();
</#if>
</#list>
<#else>
</#if>
<#list entityMapperList as entityMapper>
<#if entityMapper.markService>
	/**
	 * 保存:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param save${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象
	 */
	${entityMapper.code}Dto save${entityMapper.code}ByIdOrCode(${entityMapper.code}Dto save${entityMapper.code});

	/**
	 * 保存:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param save${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象
	 */
	${entityMapper.code}Dto save${entityMapper.code}ByName(${entityMapper.code}Dto save${entityMapper.code});

	/**
	 * 删除:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param delete${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int delete${entityMapper.code}ByCode(${entityMapper.code}Dto delete${entityMapper.code});

	/**
	 * 删除:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param delete${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int delete${entityMapper.code}ByIds(${entityMapper.code}Dto delete${entityMapper.code});

	/**
	 * 设置:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param update${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int update${entityMapper.code}ByCode(${entityMapper.code}Dto update${entityMapper.code});

	/**
	 * 设置:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param update${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int update${entityMapper.code}ByIds(${entityMapper.code}Dto update${entityMapper.code});

	/**
	 * 读取:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param read${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象
	 */
	Integer read${entityMapper.code}ByCodeNqId(${entityMapper.code}Dto read${entityMapper.code});

	/**
	 * 读取:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param read${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象
	 */
	Integer read${entityMapper.code}ByName(${entityMapper.code}Dto read${entityMapper.code});

	/**
	 * 查询:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param find${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象
	 */
	${entityMapper.code}Dto find${entityMapper.code}ByCode(${entityMapper.code}Dto find${entityMapper.code});

	/**
	 * 查询:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param find${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象
	 */
	${entityMapper.code}Dto find${entityMapper.code}ById(${entityMapper.code}Dto find${entityMapper.code});

	/**
	 * 查询:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param findList${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象集合
	 */
	List<${entityMapper.code}Dto> findList${entityMapper.code}ByCode(${entityMapper.code}Dto findList${entityMapper.code});

	/**
	 * 查询:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param findList${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}对象集合
	 */
	List<${entityMapper.code}Dto> findList${entityMapper.code}ByName(${entityMapper.code}Dto findList${entityMapper.code});
<#if entityMapper.markController>

	/**
	 * 分页:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param pagination${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}分页对象
	 */
	PaginationDto<${entityMapper.code}Dto> pagination${entityMapper.code}ByCode(${entityMapper.code}Dto pagination${entityMapper.code});
			
	/**
	 * 分页:${entityMapper.remarks!entityMapper.code}
	 * 
	 * @param pagination${entityMapper.code}
	 *            ${entityMapper.remarks!entityMapper.code}对象
	 * 
	 * @return ${entityMapper.remarks!entityMapper.code}分页对象
	 */
	PaginationDto<Map<String, Object>> pagination${entityMapper.code}ByName(${entityMapper.code}Dto pagination${entityMapper.code});
</#if>
</#if>
</#list>
}